# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-wurlitzer
pkgver=3.0.3
pkgrel=1
pkgdesc="Capture C-level stdout/stderr in Python"
url="https://github.com/minrk/wurlitzer"
arch="noarch"
license="MIT"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/minrk/wurlitzer/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/wurlitzer-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 test.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
a131ee8d8519c2458c7be7d6bd45ce742e643a31d14cfead0e4829bcdda6c97502192e928056c58e4411faf7ffb78619fc93f91ed0980acfe3f89174a07505c8  py3-wurlitzer-3.0.3.tar.gz
"
